﻿<phone:PhoneApplicationPage 
    x:Class="PhoneApp3.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d" FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait" d:DesignHeight="728" d:DesignWidth="480">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="113"/>
            <RowDefinition Height="615*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel x:Name="TitlePanel" Margin="12,17,0,6">
            <TextBlock Name="ApplicationTitle" Text="WinShare" Style="{StaticResource PhoneTextNormalStyle}" Height="43" FontSize="25" />
            <TextBlock Name="PageTitle" Text="Windows Phone" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}" FontSize="35" Height="60" Width="460" />
        </StackPanel>
        
        <ScrollViewer Grid.Row="1" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
            <Grid MaxHeight="9000">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="*" />
                    <RowDefinition Height="*" />
                </Grid.RowDefinitions>

                <StackPanel Grid.Row="1" Margin="0 0 0 8">
                    <Button   >
                        <Button.Content>
                            <Image x:Name="image6" Source="http://ww2.sinaimg.cn/large/6af0ad49jw1dydhdmcshzj.jpg" Stretch="Fill" />
                        </Button.Content>
                    </Button>
                </StackPanel>

                <StackPanel Grid.Row="2" Margin="0 0 0 8">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="240" />
                            <ColumnDefinition Width="240" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="*" />
                        </Grid.RowDefinitions>
                        <Button Width="240" Grid.Column="0"  BorderThickness="2" HorizontalContentAlignment="Stretch" Opacity="1" OpacityMask="#FFCBCB10" Padding="3">
                            <Button.Content>
                                <Image x:Name="image7" Source="http://ww2.sinaimg.cn/large/6af0ad49jw1dydhdmcshzj.jpg"  AllowDrop="False" OpacityMask="#FFE52E15" UseLayoutRounding="True" VerticalAlignment="Stretch" Visibility="Visible" Stretch="Fill" />
                            </Button.Content>
                        </Button>
                        <Button Width="240" Grid.Column="1"  BorderThickness="2" ClickMode="Press" HorizontalContentAlignment="Stretch" Opacity="1" OpacityMask="#FFCBCB10" Padding="3">
                            <Button.Content>
                                <Image x:Name="image8" Source="http://ww2.sinaimg.cn/large/6af0ad49jw1dydhdmcshzj.jpg"  AllowDrop="False" OpacityMask="#FFE52E15" UseLayoutRounding="True" VerticalAlignment="Stretch" Visibility="Visible" Stretch="Fill" />
                            </Button.Content>
                        </Button>
                    </Grid>
                </StackPanel>
                
                <StackPanel Grid.Row="0" Margin="0 0 0 8">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="240" />
                            <ColumnDefinition Width="240" />
                        </Grid.ColumnDefinitions>
                        
                        <Button x:Name="Mid_button1" Width="240" Grid.Column="0" BorderThickness="2" ClickMode="Press" HorizontalContentAlignment="Stretch" Opacity="1" OpacityMask="#FFCBCB10" Padding="3">
                            <Button.Content>
                                <Image x:Name="image1" Source="http://ww2.sinaimg.cn/large/6af0ad49jw1dydhdmcshzj.jpg" AllowDrop="False" OpacityMask="#FFE52E15" UseLayoutRounding="True" VerticalAlignment="Stretch" Visibility="Visible" Stretch="Fill" />
                            </Button.Content>
                        </Button>
                        <Grid Width="240" Grid.Column="1">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="120" />
                                <ColumnDefinition Width="120" />
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="120" />
                                <RowDefinition Height="120" />
                            </Grid.RowDefinitions>

                            <Button  Width="120" Grid.Row="0" Grid.Column="0"  Padding="3">
                                <Button.Content>
                                    <Image x:Name="image2" Source="http://ww2.sinaimg.cn/large/6af0ad49jw1dydhdmcshzj.jpg" Stretch="Fill"></Image>
                                </Button.Content>
                            </Button>
                            <Button  Width="120" Grid.Row="0" Grid.Column="1" Padding="3">
                                <Button.Content>
                                    <Image x:Name="image3" Source="http://ww2.sinaimg.cn/large/6af0ad49jw1dydhdmcshzj.jpg" Stretch="Fill"></Image>
                                </Button.Content>
                            </Button>
                            <Button  Width="120" Grid.Row="1" Grid.Column="0"  Padding="3"  >
                                <Button.Content>
                                    <Image x:Name="image4" Source="http://ww2.sinaimg.cn/large/6af0ad49jw1dydhdmcshzj.jpg" Stretch="Fill"></Image>
                                </Button.Content>
                            </Button>
                            <Button  Width="120" Grid.Row="1" Grid.Column="1"  Padding="3">
                                <Button.Content>
                                    <Image x:Name="image5" Source="http://ww2.sinaimg.cn/large/6af0ad49jw1dydhdmcshzj.jpg" Stretch="Fill"></Image>
                                </Button.Content>
                            </Button>
                            
                        </Grid>
                    </Grid>
                </StackPanel>
            </Grid>
        </ScrollViewer>
        
    </Grid>
    
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar Mode="Default" Opacity="1.0" IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton IconUri="/Icons/dark/appbar.feature.camera.rest.png" Click="Share" Text="To Share"/>
            <shell:ApplicationBarIconButton IconUri="/Icons/dark/appbar.feature.search.rest.png" Click="Change" Text="Change City"/>
            <shell:ApplicationBarIconButton IconUri="/Icons/dark/appbar.refresh.rest.png" Click="Update" Text="Update"/>
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem Text="MenuItem 1"/>
                <shell:ApplicationBarMenuItem Text="MenuItem 2"/>
                <shell:ApplicationBarMenuItem Text="MenuItem 3"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>

</phone:PhoneApplicationPage>